const a:number = 2;
console.log(a);

function testFunc(...a:number[]):number{
    var sum:number = 0;
    a.forEach((item:number)=>{
        sum += item;
    });
    return sum;
}

console.log(testFunc(1,2,3));

enum Color {red,green,yellow};

let b:Color = Color.red;

console.log(b,Color)

function test(text: string = ''){

}

let string:string = "a";
let string2:String = new String("a");


function makeMap (str: string,expectsLowerCase?: boolean): (key: string) => true | void {
    const map:object = Object.create(null)
    const list:Array<string> = str.split(',')
    for (let i = 0; i < list.length; i++) {
      map[list[i]] = 123456
    }
    return expectsLowerCase
      ? val => map[val.toLowerCase()]
      : val => map[val]
  }